package com.foreknow.demo12;

/**
 * 面试题 ： String与Stringbuffer的区别
 */
public class StringBufferDemo {
    public static void main(String[] args) {
        String  s1 = "fender";
        System.out.println(s1);

        StringBuffer stringBuffer = new StringBuffer("select * from emp");
//        if（title != null） {
//            stringBuffer.append(" where title=?");
//        }else if(name != null) {
//            stringBuffer.append(" where name=?");
//        }
        //stringBuffer.append("good");
        stringBuffer.reverse();
        System.out.println(stringBuffer);

    }
}
